Include a header file required for build on mac 10.4
[supercollider.git] / Help / Tutorials / Getting-Started / Getting Help.html
blobb08aebd94eca70ea394220d27a521998595f6fea
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <meta http-equiv="Content-Style-Type" content="text/css">
6 <title></title>
7 <meta name="Generator" content="Cocoa HTML Writer">
8 <meta name="CocoaVersion" content="824.41">
9 <style type="text/css">
10 p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Helvetica}
11 p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px}
12 p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
13 p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; color: #0021e7}
14 p.p5 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Helvetica}
15 p.p6 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #0025b2}
16 p.p7 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco}
17 p.p8 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; min-height: 12.0px}
18 p.p9 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Helvetica; min-height: 17.0px}
19 span.s1 {color: #000000}
20 span.s2 {text-decoration: underline}
21 span.s3 {font: 12.0px Helvetica}
22 span.s4 {font: 9.0px Monaco}
23 span.s5 {color: #0025b2}
24 span.s6 {color: #0024f8}
25 span.Apple-tab-span {white-space:pre}
26 </style>
27 </head>
28 <body>
29 <p class="p1"><b>Getting Help</b></p>
30 <p class="p2"><br></p>
31 <p class="p3">This is probably a good point to stop and explore some methods of finding further information. You're already familiar with the clickable links that have been used so far in this tutorial. Here's an example:</p>
32 <p class="p2"><br></p>
33 <p class="p4"><span class="s1"><span class="Apple-tab-span"> </span><a href="../../Help.html"><span class="s2">Help</span></a></span></p>
34 <p class="p2"><br></p>
35 <p class="p3">Clicking on this link will open the main help window, which contains a number of links to other help files. At some point, it would be a good idea to familiarise yourself with some of these. The ones under the headings 'Essential Topics' and 'Language' are of particular import. Again don't worry if everything doesn't immediately make complete sense to you. Learning a computer language is sometimes a little like slowly zeroing in on something, rather than getting it immediately, and some information you can just file away for future reference.</p>
36 <p class="p2"><br></p>
37 <p class="p5"><b>Classes and Methods</b></p>
38 <p class="p2"><br></p>
39 <p class="p3">By now we've learned enough OOP theory that we know that we have classes, which are like templates for objects, and instances, which are objects which have been created from those templates. We also have class and instance methods, which may take arguments. Class methods do things like create instances (as well as some convenience functions that don't require an actual instance), and instance methods control and manipulate instances. There are also instance variables, which are the data specific to each instance, and class variables, which are data in common between all instances.</p>
40 <p class="p2"><br></p>
41 <p class="p3">Recall that anything in the code that begins with an uppercase letter is a class. Most classes have help files. If you select a class by double-clicking on it, and press Cmd - d (that's hold down the Cmd key and press the d key) the help file for that class will open if it exists. (If not you'll get the main help window.) Try it with this example below:</p>
42 <p class="p2"><br></p>
43 <p class="p6"><span class="s3"><span class="Apple-tab-span"> </span></span>SinOsc</p>
44 <p class="p2"><br></p>
45 <p class="p3">You should have gotten a window with a brief description of the class and what it does, a list of some methods, and a description of their arguments. (Remember that 'mul' and 'add' are usually not explained.)</p>
46 <p class="p2"><br></p>
47 <p class="p3">Beneath that are some examples of the class in action. These can be very useful for making it clear exactly what the class does, and can serve as starting points for your own work. It's a good idea to cut and paste these to a new window, and then play around with modifying them. (Remember that SC won't stop you from saving any modified files, including this tutorial!) This is a great way to learn.</p>
48 <p class="p2"><br></p>
49 <p class="p3">You may be wondering how to access the helpfiles for Function and Array, since they often appear in code as {...} and [...]. They are also named classes, so by typing in the following, you can also select and Cmd-? on them.</p>
50 <p class="p2"><br></p>
51 <p class="p6"><span class="s3"><span class="Apple-tab-span"> </span></span>Function</p>
52 <p class="p6"><span class="Apple-tab-span"> </span>Array</p>
53 <p class="p2"><br></p>
54 <p class="p3">Some methods also have helpfiles, and there are a number of ones on general topics. Most of these are listed in the main help window.</p>
55 <p class="p2"><br></p>
56 <p class="p5"><b>Syntax Shortcuts</b></p>
57 <p class="p2"><br></p>
58 <p class="p3">Remember the example of Mix(...) vs. Mix.new(...)? SC has a number of such shorthand forms or alternate syntaxes. A common example is the distinction between Functional and receiver notation. This means that the notation <span class="s4">someObject.someMethod(anArg)</span> is equivalent to <span class="s4">someMethod(someObject, anArg)</span>. Here's a concrete example. Both of these do exactly the same thing:</p>
59 <p class="p2"><br></p>
60 <p class="p7"><span class="Apple-tab-span"> </span>{ <span class="s5">SinOsc</span>.ar(440, 0, 0.2) }.play;</p>
61 <p class="p8"><span class="Apple-tab-span"> </span></p>
62 <p class="p7"><span class="Apple-tab-span"> </span>play({ <span class="s5">SinOsc</span>.ar(440, 0, 0.2) });</p>
63 <p class="p8"><span class="Apple-tab-span"> </span></p>
64 <p class="p3">You will find numerous other examples of syntax shortcuts throughout SC's documentation. If you see something you don't recognize, a good place to check is <a href="../../Language/Syntax-Shortcuts.html"><span class="s6">Syntax-Shortcuts</span></a>, which gives examples of most of these.</p>
65 <p class="p2"><br></p>
66 <p class="p5"><b>Snooping, etc.</b></p>
67 <p class="p9"><br></p>
68 <p class="p3">SC has numerous other ways of tracking down information on classes, methods, etc. Most of these won't be too helpful for you at this point, but are good to know about for future use. Information on these can be found in the files <a href="../../More-On-Getting-Help.html"><span class="s6">More-On-Getting-Help</span></a> and <a href="../../Other Topics/Internal-Snooping.html"><span class="s6">Internal-Snooping</span></a>.</p>
69 <p class="p2"><br></p>
70 <p class="p3">For more information see:<b><span class="Apple-converted-space"> </span></b></p>
71 <p class="p2"><br></p>
72 <p class="p4"><span class="s2"><a href="../../More-On-Getting-Help.html">More-On-Getting-Help</a></span><span class="s1"><b> </b><a href="../../Other Topics/Internal-Snooping.html"><span class="s2">Internal-Snooping</span></a><b> </b><a href="../../Language/Syntax-Shortcuts.html"><span class="s2">Syntax-Shortcuts</span></a></span></p>
73 <p class="p2"><br></p>
74 <p class="p5"><b>Suggested Exercise:</b></p>
75 <p class="p9"><br></p>
76 <p class="p3">Go back over the examples in the previous tutorials, and try opening up the helpfiles for the various classes used. Try out the examples, and if you like open up the help files for any unfamiliar classes used in those examples. Get used to Cmd-d, you'll be using it a lot. :-)</p>
77 <p class="p2"><br></p>
78 <p class="p3">____________________</p>
79 <p class="p2"><br></p>
80 <p class="p3">This document is part of the tutorial <b>Getting Started With SuperCollider</b>.</p>
81 <p class="p2"><br></p>
82 <p class="p3">Click here to go on to the next section: <a href="SynthDefs and Synths.html"><span class="s6">SynthDefs and Synths</span></a></p>
83 <p class="p2"><br></p>
84 <p class="p3">Click here to return to the table of Contents: <a href="Getting Started With SC.html"><span class="s6">Getting Started With SC</span></a></p>
85 </body>
86 </html>